﻿@model ContactManagement.Models.DynamicData.EditModel
@{
    ViewBag.Title = Resources.PageTitles.EditDynamicDataTypeRESX + ": " + Model.CurrentDynamicDataType.Name;
}
<h2>
    @Resources.PageTitles.EditDynamicDataTypeRESX: @Model.CurrentDynamicDataType.Name (@Model.CurrentDynamicDataType.GetDynamicDataTypeName())</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    @Html.ShowCustomMessage()
    <fieldset>
        <legend>DynamicDataAddModel</legend>
        <div class="view-item">
            <div class="editor-label">
                @Html.LabelFor(model => model.Name)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>
        <div class="clear-all">
        </div>
        <div class="view-item">
            <div class="editor-label">
                @Html.LabelFor(model => model.DynamicDataTypeCategories)
            </div>
            <div class="editor-field">
                @Html.DropDownListFor(model => model.DynamicDataTypeCategoryId, Model.DynamicDataTypeCategories, Resources.GlobalStrings.PleaseSelectItemsRESX)
                @Html.ValidationMessageFor(model => model.DynamicDataTypeCategoryId)
            </div>
        </div>
        <div class="clear-all">
        </div>
        <div class="view-item">
            <div class="editor-label">
                @Html.LabelFor(model => model.IsVisible)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.IsVisible)
                @Html.ValidationMessageFor(model => model.IsVisible)
            </div>
        </div>
        <div class="clear-all">
        </div>
         <div class="view-item">
            <div class="editor-label">
                @Html.LabelFor(model => model.IsFilterable)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.IsFilterable)
                @Html.ValidationMessageFor(model => model.IsFilterable)
            </div>
        </div>
        <div class="clear-all">
        </div>
        <div class="view-item">
            <div class="editor-label">
                @Html.LabelFor(model => model.SortId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SortId)
                @Html.ValidationMessageFor(model => model.SortId)
            </div>
        </div>
        <div class="clear-all">
        </div>
        <div class="view-item">
            <div class="editor-label">
                @Html.LabelFor(model => model.CustomCssClass)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.CustomCssClass)
                @Html.ValidationMessageFor(model => model.CustomCssClass)
            </div>
        </div>
        <div class="clear-all">
        </div>
        <div class="view-item">
            <div class="editor-label">
                @Html.LabelFor(model => model.Description)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>
        <div class="clear-all">
        </div>
        <p>
            <input type="submit" value="@Resources.Navigation.SaveChangesRESX" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink(@Resources.Navigation.BackToListRESX, EActionDynamicData.DynamicDataTypesList.ToString()) |
    @Html.ActionLink(@Resources.Navigation.DynamicDataEditGroupRightsRESX, EActionDynamicData.EditGroupRights.ToString(), new { id = Model.CurrentDynamicDataType.ID })
</div>
